
/*   RolGPS Project
 * 
 *   Copyright (C) 2009 Pablo Alejandro Costesich <rhfixer@gmail.com>
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */
package org.rolgps.libedb.standard;

import java.util.List;
import org.rolgps.libedb.exception.DuplicateTableException;
import org.rolgps.libedb.exception.UnknownTableException;

/**
 *
 * @author xeph
 */
public interface Manager {

    public static final String COMPLETE = "complete";
    public static final String STRUCTUREONLY = "structure";
    public static final String DATAONLY = "data";

    public void dumpSQL(String state);

    public void importSQL(StringBuffer sql);

    public void addTable(Table table) throws DuplicateTableException;

    public void install();
    
    public void uninstall();
    
    public void removeTable(Table table) throws UnknownTableException;

    public void alterTable(Table table, String alterationString);

    public void addUser(String name);

    public void deleteUser(String name);

    public String[] getUsers();

    public void renameUser(String oldName, String newName);

    public void setOwner(String ownerName);

    public int getOwnerId(String ownerName);

    public List <Table> getTables();

    public List <Table> getTablesByOwnerName(String ownerName);

    public List <Table> getTablesByOwnerId(int ownerId);

    public String getManagerVersion();

    public String getManagerName();
}
